/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * inicio.java
 *
 * Created on 14/09/2012, 12:13:14 PM
 */
package interfaz;

import interfaz.variables;
import interfaz.variables;

/**
 *
 * @author Isis
 */
public class configuracion extends javax.swing.JPanel {

    /** Creates new form inicio */
    public configuracion() {
        initComponents();
        inicializarLayout();
    }

    public void inicializarLayout(){
    this.setLayout(null);
    this.panelTareasConfiguracion.setBounds(5, 5, 175, 540);
    this.panelConfiguracion.setBounds(185,5,variables.anchoAreaDeTrabajo-210,540);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        panelTareasConfiguracion = new javax.swing.JPanel();
        selecAuto = new javax.swing.JPanel();
        menuAuto = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        selecClima = new javax.swing.JPanel();
        menuClima = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        panelConfiguracion = new javax.swing.JPanel();

        setBackground(new java.awt.Color(200, 106, 38));
        setPreferredSize(new java.awt.Dimension(916, 462));

        panelTareasConfiguracion.setBackground(new java.awt.Color(255, 255, 255));

        selecAuto.setBackground(new java.awt.Color(255, 255, 255));

        menuAuto.setBackground(new java.awt.Color(255, 51, 51));
        menuAuto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/auto.png"))); // NOI18N
        menuAuto.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                menuAutoMouseClicked(evt);
            }
        });

        jLabel2.setText("Configurar Automóvil");

        javax.swing.GroupLayout selecAutoLayout = new javax.swing.GroupLayout(selecAuto);
        selecAuto.setLayout(selecAutoLayout);
        selecAutoLayout.setHorizontalGroup(
            selecAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(selecAutoLayout.createSequentialGroup()
                .addGroup(selecAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(selecAutoLayout.createSequentialGroup()
                        .addGap(29, 29, 29)
                        .addComponent(jLabel2))
                    .addGroup(selecAutoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(menuAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        selecAutoLayout.setVerticalGroup(
            selecAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, selecAutoLayout.createSequentialGroup()
                .addComponent(menuAuto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addContainerGap())
        );

        selecClima.setBackground(new java.awt.Color(255, 255, 255));

        menuClima.setBackground(new java.awt.Color(255, 51, 51));
        menuClima.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/sun_clouds_thunder_rain.png"))); // NOI18N
        menuClima.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                menuClimaMouseClicked(evt);
            }
        });

        jLabel6.setText("Configurar Clima");

        javax.swing.GroupLayout selecClimaLayout = new javax.swing.GroupLayout(selecClima);
        selecClima.setLayout(selecClimaLayout);
        selecClimaLayout.setHorizontalGroup(
            selecClimaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(selecClimaLayout.createSequentialGroup()
                .addGroup(selecClimaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(selecClimaLayout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(jLabel6))
                    .addGroup(selecClimaLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(menuClima, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)))
                .addContainerGap())
        );
        selecClimaLayout.setVerticalGroup(
            selecClimaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, selecClimaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(menuClima, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel6)
                .addContainerGap())
        );

        javax.swing.GroupLayout panelTareasConfiguracionLayout = new javax.swing.GroupLayout(panelTareasConfiguracion);
        panelTareasConfiguracion.setLayout(panelTareasConfiguracionLayout);
        panelTareasConfiguracionLayout.setHorizontalGroup(
            panelTareasConfiguracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(selecAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(selecClima, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelTareasConfiguracionLayout.setVerticalGroup(
            panelTareasConfiguracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTareasConfiguracionLayout.createSequentialGroup()
                .addComponent(selecAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(selecClima, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(114, Short.MAX_VALUE))
        );

        panelConfiguracion.setBackground(new java.awt.Color(199, 105, 38));

        javax.swing.GroupLayout panelConfiguracionLayout = new javax.swing.GroupLayout(panelConfiguracion);
        panelConfiguracion.setLayout(panelConfiguracionLayout);
        panelConfiguracionLayout.setHorizontalGroup(
            panelConfiguracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 714, Short.MAX_VALUE)
        );
        panelConfiguracionLayout.setVerticalGroup(
            panelConfiguracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 451, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelTareasConfiguracion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(panelConfiguracion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelTareasConfiguracion, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelConfiguracion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(11, 11, 11))
        );
    }// </editor-fold>

    private void menuAutoMouseClicked(java.awt.event.MouseEvent evt) {                                      
        // TODO add your handling code here:
              if(interfaz.variables.enUso==0){
            interfaz.variables.enUso=1;
        interfaz.configAuto cAuto = new interfaz.configAuto();
        cAuto.setBounds(0,0,variables.anchoAreaDeTrabajo-210,540);
        this.panelConfiguracion.add(cAuto);
        
        this.panelConfiguracion.setVisible(false);
        this.panelConfiguracion.setVisible(true);
        
        interfaz.principal.anularIcono(interfaz.principal.iconoMapa);
        interfaz.principal.anularIcono(interfaz.principal.iconoConfig);
        interfaz.principal.anularIcono(interfaz.principal.iconoAyuda);
        interfaz.principal.anularIcono(interfaz.principal.iconoInfo);
        interfaz.principal.anularIcono(interfaz.principal.iconoHome);
        
              }else{System.out.println("ab");}
    }                                     

    private void menuClimaMouseClicked(java.awt.event.MouseEvent evt) {                                       
        // TODO add your handling code here:
        if(interfaz.variables.enUso==0){
            interfaz.variables.enUso=1;
        interfaz.configClima cClima = new interfaz.configClima();
        cClima.setBounds(0,0,variables.anchoAreaDeTrabajo-210,540);
        this.panelConfiguracion.add(cClima);
        
        interfaz.principal.anularIcono(interfaz.principal.iconoMapa);
        interfaz.principal.anularIcono(interfaz.principal.iconoConfig);
        interfaz.principal.anularIcono(interfaz.principal.iconoAyuda);
        interfaz.principal.anularIcono(interfaz.principal.iconoInfo);
        interfaz.principal.anularIcono(interfaz.principal.iconoHome);
       
        this.panelConfiguracion.setVisible(false);
        this.panelConfiguracion.setVisible(true);
        }
    }                                      
    public static void anularIcono(javax.swing.JLabel icono)
    {
        icono.setVisible(false);
    }
    
     public static void activarIcono(javax.swing.JLabel icono)
    {
        icono.setVisible(true);
    }
    
    // Variables declaration - do not modify
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel6;
    public static javax.swing.JLabel menuAuto;
    public static javax.swing.JLabel menuClima;
    private javax.swing.JPanel panelConfiguracion;
    private javax.swing.JPanel panelTareasConfiguracion;
    private javax.swing.JPanel selecAuto;
    private javax.swing.JPanel selecClima;
    // End of variables declaration
}
